package com.dxy.yesas2020goals.study.partone.disignpattern.prototypepattern;

import java.util.Arrays;

/**
 * @author victorydeng
 * @Classname JsonTest
 * @Description TODO
 * @Date 2020/3/1 13:53
 * @Created by victorydeng
 */
public class JsonTest {

  public static void main(String[] args) {
    Prototype p = new Prototype();
    p.setId(1);
    p.setName("test");
    p.setNumber(666);
    p.setProssion(Arrays.asList("Java", "php", "c++", "python"));

    Prototype p2 = p.clone(p);
    p2.setId(555);
    p2.setProssion(Arrays.asList("5555", "7777", "99999", "5465646"));
    System.out.println("原型数据：" + p);
    System.out.println("拷贝数据：" + p2);
    System.out.println(p == p2);


  }

}
